package com.jian.java.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;

/**
 * @author Jiange
 * @create 2021-06-03-15:07
 */
@EnableBinding(Source.class)
public class MessageProvider {

    @Autowired
    private MessageChannel output;

    public String send(){
        output.send(MessageBuilder.withPayload("建哥最帅").build());
        return null;
    }
}
